<?php

namespace app\index\controller;

use app\admin\model\Banner;
use app\admin\model\Offer;
use app\common\controller\Frontend;

class Index extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';

    public function index()
    {
        $bannerList=Banner::where('plat','pc')->where('status','normal')->order('id desc')->select();
        $this->assign('bannerList',$bannerList);
        $title="首页";
        $this->assign("title",$title);
        $offer=Offer::order('id desc')->paginate(10);
        $this->assign('offer',$offer->items());
        return $this->view->fetch();
    }

}
